home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
bytesc88.arc
/
EXIT.C
< prev
next >
Wrap
Text File
|
1987-10-04
|
640b
|
26 lines
#define NOCCARGC /* no argument count passing */
#include stdio.h
#include clib.def
/*
** Close all open files and exit to CP/M.
** Entry: errcode = Character to be sent to stderr.
** Returns to CP/M rather than the caller.
*/
exit(errcode) char errcode; {
int fd;
if(errcode) Uconout(errcode);
/* Following code not needed for MS-DOS (given that we
** are using function 4C to terminate -- it closes
** active handles for us).
*/
/* for(fd=0; fd < MAXFILES; fclose(fd++)); */
Umsdos(0,0,0,19456); /* 19456 = 4C00H, 4C in AH terminates */
}
#asm
_abort: JMP _exit
PUBLIC _abort
#endasm